#!/bin/sh

set -e

STATE="$1"

case "$STATE" in

    NeedsArtifactReboot)
        echo "Yes"
        ;;

    SupportsRollback)
        echo "Yes"
        ;;

    Download|ArtifactInstall|ArtifactRollback)
        ;;

    ArtifactReboot|ArtifactRollbackReboot)
        systemctl restart mender-updated
        ;;

esac

exit 0

